<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>Docs For Class PhormField</title>
			<link rel="stylesheet" href="../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
		</head>
		<body>
			<div class="page-body">			
<h2 class="class-name">Class PhormField</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
							<a href="#sec-descendents">Descendents</a>
			|											<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
						|											<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
						
					</div>
	<div class="info-box-body">
        		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">PhormField</p>
<p class="description"><p>Abstract class from which all other field classes are derived.</p></p>
	<ul class="tags">
				<li><span class="field">author:</span> Jeff Ober</li>
				<li><span class="field">abstract:</span> </li>
			</ul>
		<p class="notes">
			Located in <a class="field" href="_fields.php.html">/fields.php</a> (line <span class="field">38</span>)
		</p>
		
				
		<pre></pre>
	
			</div>
</div>

	<a name="sec-descendents"></a>
	<div class="info-box">
		<div class="info-box-title">Direct descendents</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
			<span class="disabled">Descendents</span>
			|												<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
								|															<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
								</div>
		<div class="info-box-body">
			<table cellpadding="2" cellspacing="0" class="class-table">
				<tr>
					<th class="class-table-header">Class</th>
					<th class="class-table-header">Description</th>
				</tr>
								<tr>
					<td style="padding-right: 2em"><a href="../Fields/FileField.html">FileField</a></td>
					<td>
											FileField
										</td>
				</tr>
								<tr>
					<td style="padding-right: 2em"><a href="../Fields/TextField.html">TextField</a></td>
					<td>
											TextField
										</td>
				</tr>
								<tr>
					<td style="padding-right: 2em"><a href="../Fields/LargeTextField.html">LargeTextField</a></td>
					<td>
											LargeTextField
										</td>
				</tr>
								<tr>
					<td style="padding-right: 2em"><a href="../Fields/IntegerField.html">IntegerField</a></td>
					<td>
											IntegerField
										</td>
				</tr>
								<tr>
					<td style="padding-right: 2em"><a href="../Fields/DecimalField.html">DecimalField</a></td>
					<td>
											DecimalField
										</td>
				</tr>
								<tr>
					<td style="padding-right: 2em"><a href="../Fields/BooleanField.html">BooleanField</a></td>
					<td>
											BooleanField
										</td>
				</tr>
								<tr>
					<td style="padding-right: 2em"><a href="../Fields/DropDownField.html">DropDownField</a></td>
					<td>
											DropDownField
										</td>
				</tr>
								<tr>
					<td style="padding-right: 2em"><a href="../Fields/MultipleChoiceField.html">MultipleChoiceField</a></td>
					<td>
											MultipleChoiceField
										</td>
				</tr>
							</table>
		</div>
	</div>


	<a name="sec-var-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Variable Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
							<a href="#sec-descendents">Descendents</a> |
						<span class="disabled">Vars</span> (<a href="#sec-vars">details</a>)
							| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
								</div>
		<div class="info-box-body">
			<div class="var-summary">
																																																																																								<div class="var-title">
					<span class="var-type">mixed</span>
					<a href="#$attributes" title="details" class="var-name">$attributes</a>
				</div>
																<div class="var-title">
					<span class="var-type">mixed</span>
					<a href="#$errors" title="details" class="var-name">$errors</a>
				</div>
																<div class="var-title">
					<span class="var-type">mixed</span>
					<a href="#$help_text" title="details" class="var-name">$help_text</a>
				</div>
																<div class="var-title">
					<span class="var-type">mixed</span>
					<a href="#$imported" title="details" class="var-name">$imported</a>
				</div>
																<div class="var-title">
					<span class="var-type">mixed</span>
					<a href="#$label" title="details" class="var-name">$label</a>
				</div>
																<div class="var-title">
					<span class="var-type">mixed</span>
					<a href="#$multi_field" title="details" class="var-name">$multi_field</a>
				</div>
																<div class="var-title">
					<span class="var-type">mixed</span>
					<a href="#$valid" title="details" class="var-name">$valid</a>
				</div>
																<div class="var-title">
					<span class="var-type">mixed</span>
					<a href="#$validators" title="details" class="var-name">$validators</a>
				</div>
																<div class="var-title">
					<span class="var-type">mixed</span>
					<a href="#$value" title="details" class="var-name">$value</a>
				</div>
											</div>
		</div>
	</div>

	<a name="sec-method-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Method Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
							<a href="#sec-descendents">Descendents</a> |
																		<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
				 
				|
						<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
		</div>
		<div class="info-box-body">			
			<div class="method-summary">
																																																																																																																																																						
				<div class="method-definition">
											<span class="method-result">null</span>
										<a href="#__construct" title="details" class="method-name">__construct</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$label</span>, [<span class="var-type"></span>&nbsp;<span class="var-name">$validators</span> = <span class="var-default">array()</span>], [<span class="var-type"></span>&nbsp;<span class="var-name">$attributes</span> = <span class="var-default">array()</span>])
									</div>
														
				<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#errors" title="details" class="method-name">errors</a>
										()
									</div>
														
				<div class="method-definition">
											<span class="method-result">string|null</span>
										<a href="#get_attribute" title="details" class="method-name">get_attribute</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$key</span>)
									</div>
														
				<div class="method-definition">
											<span class="method-result">array|null</span>
										<a href="#get_errors" title="details" class="method-name">get_errors</a>
										()
									</div>
														
				<div class="method-definition">
											<span class="method-result">mixed</span>
										<a href="#get_value" title="details" class="method-name">get_value</a>
										()
									</div>
														
				<div class="method-definition">
											<span class="method-result"><a href="../Widgets/PhormWidget.html">PhormWidget</a></span>
										<a href="#get_widget" title="details" class="method-name">get_widget</a>
										()
									</div>
														
				<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#help_text" title="details" class="method-name">help_text</a>
										()
									</div>
														
				<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#html" title="details" class="method-name">html</a>
										()
									</div>
														
				<div class="method-definition">
											<span class="method-result">mixed</span>
										<a href="#import_value" title="details" class="method-name">import_value</a>
											(<span class="var-type">string|mixed</span>&nbsp;<span class="var-name">$value</span>)
									</div>
														
				<div class="method-definition">
											<span class="method-result">boolean</span>
										<a href="#is_valid" title="details" class="method-name">is_valid</a>
											([<span class="var-type">boolean</span>&nbsp;<span class="var-name">$reprocess</span> = <span class="var-default">false</span>])
									</div>
														
				<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#label" title="details" class="method-name">label</a>
										()
									</div>
														
				<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#prepare_value" title="details" class="method-name">prepare_value</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$value</span>)
									</div>
														
				<div class="method-definition">
											<span class="method-result">null</span>
										<a href="#set_attribute" title="details" class="method-name">set_attribute</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$key</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$value</span>)
									</div>
														
				<div class="method-definition">
											<span class="method-result">null</span>
										<a href="#set_help_text" title="details" class="method-name">set_help_text</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$text</span>)
									</div>
														
				<div class="method-definition">
											<span class="method-result">null</span>
										<a href="#set_value" title="details" class="method-name">set_value</a>
											(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$value</span>)
									</div>
														
				<div class="method-definition">
											<span class="method-result">null</span>
										<a href="#validate" title="details" class="method-name">validate</a>
											(<span class="var-type">string|mixed</span>&nbsp;<span class="var-name">$value</span>)
									</div>
														
				<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#__toString" title="details" class="method-name">__toString</a>
										()
									</div>
											</div>
		</div>
	</div>		

	<a name="sec-vars"></a>
	<div class="info-box">
		<div class="info-box-title">Variables</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
							<a href="#sec-descendents">Descendents</a> |
										<a href="#sec-var-summary">Vars</a> (<span class="disabled">details</span>)
						
			
										| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
					</div>
		<div class="info-box-body">
			
<a name="var$attributes" id="$attributes"><!-- --></A>
<div class="oddrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">mixed</span>
			<span class="var-name">$attributes</span>
						(line <span class="line-number">57</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Associative array of key/value pairs representing HTML attributes of the field.</p>
	<ul class="tags">
				<li><span class="field">access:</span> private</li>
			</ul>
	
	
		
		

</div>
<a name="var$errors" id="$errors"><!-- --></A>
<div class="evenrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">mixed</span>
			<span class="var-name">$errors</span>
						(line <span class="line-number">61</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Array storing errors generated during field validation.</p>
	<ul class="tags">
				<li><span class="field">access:</span> private</li>
			</ul>
	
	
		
		

</div>
<a name="var$help_text" id="$help_text"><!-- --></A>
<div class="oddrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">mixed</span>
			<span class="var-name">$help_text</span>
			 = <span class="var-default"> &quot;&quot;</span>			(line <span class="line-number">69</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Help text for the field. This is printed out with the field HTML.</p>
	<ul class="tags">
				<li><span class="field">access:</span> private</li>
			</ul>
	
	
		
		

</div>
<a name="var$imported" id="$imported"><!-- --></A>
<div class="evenrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">mixed</span>
			<span class="var-name">$imported</span>
						(line <span class="line-number">65</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Storage of the &quot;cleaned&quot; field value.</p>
	<ul class="tags">
				<li><span class="field">access:</span> private</li>
			</ul>
	
	
		
		

</div>
<a name="var$label" id="$label"><!-- --></A>
<div class="oddrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">mixed</span>
			<span class="var-name">$label</span>
						(line <span class="line-number">43</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">The field's text label.</p>
	<ul class="tags">
				<li><span class="field">access:</span> private</li>
			</ul>
	
	
		
		

</div>
<a name="var$multi_field" id="$multi_field"><!-- --></A>
<div class="evenrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">mixed</span>
			<span class="var-name">$multi_field</span>
			 = <span class="var-default"> false</span>			(line <span class="line-number">74</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">If true, this field uses multiple field widgets.</p>
	<ul class="tags">
				<li><span class="field">see:</span> <a href="../Widgets/_widgets.php.html">widgets.php</a></li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	
		
			<hr class="separator" />
		<div class="notes">Redefined in descendants as:</div>
		<ul class="redefinitions">
					<li>
				<a href="../Fields/MultipleChoiceField.html#var$multi_field">MultipleChoiceField::$multi_field</a>
								: Specifies that this field's name attribute must be post-fixed by [].
							</li>
				</ul>
		

</div>
<a name="var$valid" id="$valid"><!-- --></A>
<div class="oddrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">mixed</span>
			<span class="var-name">$valid</span>
						(line <span class="line-number">78</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Stores the result of field validation to prevents double-validation.</p>
	<ul class="tags">
				<li><span class="field">access:</span> private</li>
			</ul>
	
	
		
		

</div>
<a name="var$validators" id="$validators"><!-- --></A>
<div class="evenrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">mixed</span>
			<span class="var-name">$validators</span>
						(line <span class="line-number">53</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Array of callbacks used to validate field data. May be either a string  denoting a function or an array of array(instance, string method) to use  a class instance method.</p>
	<ul class="tags">
				<li><span class="field">access:</span> private</li>
			</ul>
	
	
		
		

</div>
<a name="var$value" id="$value"><!-- --></A>
<div class="oddrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">mixed</span>
			<span class="var-name">$value</span>
						(line <span class="line-number">47</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Store's the field's value. Set during validation.</p>
	<ul class="tags">
				<li><span class="field">access:</span> private</li>
			</ul>
	
	
		
		

</div>
						
		</div>
	</div>
	
	<a name="sec-methods"></a>
	<div class="info-box">
		<div class="info-box-title">Methods</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
							<a href="#sec-descendents">Descendents</a> |
															<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
																	<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
						
		</div>
		<div class="info-box-body">
			<A NAME='method_detail'></A>
<a name="method__construct" id="__construct"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">Constructor __construct</span> (line <span class="line-number">87</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">author:</span> Jeff Ober</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">null</span>
		<span class="method-name">
			__construct
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$label</span>, [<span class="var-type"></span>&nbsp;<span class="var-name">$validators</span> = <span class="var-default">array()</span>], [<span class="var-type"></span>&nbsp;<span class="var-name">$attributes</span> = <span class="var-default">array()</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$label</span><span class="var-description">: the field's label</span>			</li>
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$validators</span><span class="var-description">: callbacks used to validate field data</span>			</li>
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$attributes</span><span class="var-description">: an assoc of key/value pairs representing HTML attributes</span>			</li>
				</ul>
		
			
			<hr class="separator" />
		<div class="notes">Redefined in descendants as:</div>
		<ul class="redefinitions">
					<li>
				<a href="../Fields/FileField.html#method__construct">FileField::__construct()</a>
							</li>
					<li>
				<a href="../Fields/ImageField.html#method__construct">ImageField::__construct()</a>
							</li>
					<li>
				<a href="../Fields/TextField.html#method__construct">TextField::__construct()</a>
							</li>
					<li>
				<a href="../Fields/HiddenField.html#method__construct">HiddenField::__construct()</a>
							</li>
					<li>
				<a href="../Fields/PasswordField.html#method__construct">PasswordField::__construct()</a>
							</li>
					<li>
				<a href="../Fields/DateTimeField.html#method__construct">DateTimeField::__construct()</a>
							</li>
					<li>
				<a href="../Fields/RegexField.html#method__construct">RegexField::__construct()</a>
							</li>
					<li>
				<a href="../Fields/ScanField.html#method__construct">ScanField::__construct()</a>
							</li>
					<li>
				<a href="../Fields/LargeTextField.html#method__construct">LargeTextField::__construct()</a>
							</li>
					<li>
				<a href="../Fields/IntegerField.html#method__construct">IntegerField::__construct()</a>
							</li>
					<li>
				<a href="../Fields/DecimalField.html#method__construct">DecimalField::__construct()</a>
							</li>
					<li>
				<a href="../Fields/BooleanField.html#method__construct">BooleanField::__construct()</a>
							</li>
					<li>
				<a href="../Fields/DropDownField.html#method__construct">DropDownField::__construct()</a>
							</li>
					<li>
				<a href="../Fields/MultipleChoiceField.html#method__construct">MultipleChoiceField::__construct()</a>
							</li>
				</ul>
	</div>
<a name="methoderrors" id="errors"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">errors</span> (line <span class="line-number">199</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns the field's errors as an unordered list with the class &quot;phorm_error&quot;.</p>
	<ul class="tags">
				<li><span class="field">return:</span> the field errors as an unordered list</li>
				<li><span class="field">author:</span> Jeff Ober</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			errors
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodget_attribute" id="get_attribute"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">get_attribute</span> (line <span class="line-number">144</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns the value of an HTML attribute or null if not set.</p>
	<ul class="tags">
				<li><span class="field">return:</span> the attribute's value or null if not set</li>
				<li><span class="field">author:</span> Jeff Ober</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string|null</span>
		<span class="method-name">
			get_attribute
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$key</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$key</span><span class="var-description">: the attribute name to look up</span>			</li>
				</ul>
		
			
	</div>
<a name="methodget_errors" id="get_errors"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">get_errors</span> (line <span class="line-number">157</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns a list of errors generated during validation. If the field is not  yet validated, returns null.</p>
	<ul class="tags">
				<li><span class="field">author:</span> Jeff Ober</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">array|null</span>
		<span class="method-name">
			get_errors
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodget_value" id="get_value"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">get_value</span> (line <span class="line-number">121</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns the &quot;cleaned&quot; value of the field.</p>
	<ul class="tags">
				<li><span class="field">return:</span> the field's &quot;cleaned&quot; value</li>
				<li><span class="field">author:</span> Jeff Ober</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">mixed</span>
		<span class="method-name">
			get_value
		</span>
				()
			</div>
	
		
			
			<hr class="separator" />
		<div class="notes">Redefined in descendants as:</div>
		<ul class="redefinitions">
					<li>
				<a href="../Fields/BooleanField.html#methodget_value">BooleanField::get_value()</a>
								: Returns true if the field is checked.
							</li>
				</ul>
	</div>
<a name="methodget_widget" id="get_widget"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">get_widget</span> (line <span class="line-number">274</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Defined in derived classes; must return an instance of PhormWidget.</p>
	<ul class="tags">
				<li><span class="field">return:</span> the field's widget</li>
				<li><span class="field">see:</span> <a href="../Widgets/PhormWidget.html">PhormWidget</a></li>
				<li><span class="field">abstract:</span> </li>
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result"><a href="../Widgets/PhormWidget.html">PhormWidget</a></span>
		<span class="method-name">
			get_widget
		</span>
				()
			</div>
	
		
			
			<hr class="separator" />
		<div class="notes">Redefined in descendants as:</div>
		<ul class="redefinitions">
					<li>
				<a href="../Fields/FileField.html#methodget_widget">FileField::get_widget()</a>
								: Returns a FileWidget.
							</li>
					<li>
				<a href="../Fields/TextField.html#methodget_widget">TextField::get_widget()</a>
								: Returns a new CharWidget.
							</li>
					<li>
				<a href="../Fields/HiddenField.html#methodget_widget">HiddenField::get_widget()</a>
								: Returns a new HiddenWidget.
							</li>
					<li>
				<a href="../Fields/PasswordField.html#methodget_widget">PasswordField::get_widget()</a>
								: Returns a PasswordWidget.
							</li>
					<li>
				<a href="../Fields/LargeTextField.html#methodget_widget">LargeTextField::get_widget()</a>
								: Returns a new TextWidget.
							</li>
					<li>
				<a href="../Fields/IntegerField.html#methodget_widget">IntegerField::get_widget()</a>
								: Returns a new CharWidget.
							</li>
					<li>
				<a href="../Fields/DecimalField.html#methodget_widget">DecimalField::get_widget()</a>
								: Returns a new CharWidget.
							</li>
					<li>
				<a href="../Fields/BooleanField.html#methodget_widget">BooleanField::get_widget()</a>
								: Returns a new CheckboxWidget.
							</li>
					<li>
				<a href="../Fields/DropDownField.html#methodget_widget">DropDownField::get_widget()</a>
								: Returns a new SelectWidget.
							</li>
					<li>
				<a href="../Fields/MultipleChoiceField.html#methodget_widget">MultipleChoiceField::get_widget()</a>
								: Returns a new MultiSelectWidget.
							</li>
					<li>
				<a href="../Fields/OptionsField.html#methodget_widget">OptionsField::get_widget()</a>
								: Returns a new OptionGroupWidget.
							</li>
				</ul>
	</div>
<a name="methodhelp_text" id="help_text"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">help_text</span> (line <span class="line-number">167</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns an HTML string containing the field's help text.</p>
	<ul class="tags">
				<li><span class="field">return:</span> the HTML help text paragraph</li>
				<li><span class="field">author:</span> Jeff Ober</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			help_text
		</span>
				()
			</div>
	
		
			
			<hr class="separator" />
		<div class="notes">Redefined in descendants as:</div>
		<ul class="redefinitions">
					<li>
				<a href="../Fields/HiddenField.html#methodhelp_text">HiddenField::help_text()</a>
								: Does not print out the help text.
							</li>
				</ul>
	</div>
<a name="methodhtml" id="html"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">html</span> (line <span class="line-number">187</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns the field's tag as HTML.</p>
	<ul class="tags">
				<li><span class="field">return:</span> the field as HTML</li>
				<li><span class="field">author:</span> Jeff Ober</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			html
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodimport_value" id="import_value"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">import_value</span> (line <span class="line-number">292</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns the field's &quot;imported&quot; value, if any processing is required. For  example, this function may be used to convert a date/time field's string  into a unix timestamp or a numeric string into an integer or float.</p>
	<ul class="tags">
				<li><span class="field">abstract:</span> </li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">mixed</span>
		<span class="method-name">
			import_value
		</span>
					(<span class="var-type">string|mixed</span>&nbsp;<span class="var-name">$value</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string|mixed</span>
				<span class="var-name">$value</span><span class="var-description">: the pre-processed string value (or mixed if prepare_value returns a non-string)</span>			</li>
				</ul>
		
			
			<hr class="separator" />
		<div class="notes">Redefined in descendants as:</div>
		<ul class="redefinitions">
					<li>
				<a href="../Fields/FileField.html#methodimport_value">FileField::import_value()</a>
								: On a successful upload, returns a new File instance.
							</li>
					<li>
				<a href="../Fields/TextField.html#methodimport_value">TextField::import_value()</a>
								: Imports the value by decoding HTML entities.
							</li>
					<li>
				<a href="../Fields/PasswordField.html#methodimport_value">PasswordField::import_value()</a>
								: Returns a hash-encoded value.
							</li>
					<li>
				<a href="../Fields/DateTimeField.html#methodimport_value">DateTimeField::import_value()</a>
								: Imports the value and returns a unix timestamp (the number of seconds
							</li>
					<li>
				<a href="../Fields/RegexField.html#methodimport_value">RegexField::import_value()</a>
								: Returns the captured values that were parsed inside validate().
							</li>
					<li>
				<a href="../Fields/ScanField.html#methodimport_value">ScanField::import_value()</a>
								: Returns the parsed matches that were captured in validate().
							</li>
					<li>
				<a href="../Fields/LargeTextField.html#methodimport_value">LargeTextField::import_value()</a>
								: Imports the value by decoding HTML entities.
							</li>
					<li>
				<a href="../Fields/IntegerField.html#methodimport_value">IntegerField::import_value()</a>
								: Parses the value as an integer.
							</li>
					<li>
				<a href="../Fields/DecimalField.html#methodimport_value">DecimalField::import_value()</a>
								: Returns the parsed float, rounded to $this-&gt;precision digits.
							</li>
					<li>
				<a href="../Fields/BooleanField.html#methodimport_value">BooleanField::import_value()</a>
								: Returns true if the field was checked in the user-submitted data, false  otherwise.
							</li>
					<li>
				<a href="../Fields/DropDownField.html#methodimport_value">DropDownField::import_value()</a>
								: Imports the value by decoding any HTML entities. Returns the &quot;actual&quot;  value of the option selected.
							</li>
					<li>
				<a href="../Fields/MultipleChoiceField.html#methodimport_value">MultipleChoiceField::import_value()</a>
								: Imports the value as an array of the actual values (from $this-&gt;choices.)
							</li>
				</ul>
	</div>
<a name="methodis_valid" id="is_valid"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">is_valid</span> (line <span class="line-number">230</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">On the first call, calls each validator on the field value, and returns</p>
<p class="description"><p>true if each returned successfully, false if any raised a  ValidationError. On subsequent calls, returns the same value as the  initial call. If $reprocess is set to true (default: false), will  call each of the validators again. Stores the &quot;cleaned&quot; value of the  field on success.</p></p>
	<ul class="tags">
				<li><span class="field">return:</span> true if the field's value is valid</li>
				<li><span class="field">author:</span> Jeff Ober</li>
				<li><span class="field">see:</span> <a href="../Fields/PhormField.html#var$valid">PhormField::$valid</a>, <a href="../Fields/PhormField.html#var$imported">PhormField::$imported</a>, <a href="../Fields/PhormField.html#var$validators">PhormField::$validators</a>, <a href="../Fields/PhormField.html#var$errors">PhormField::$errors</a></li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">boolean</span>
		<span class="method-name">
			is_valid
		</span>
					([<span class="var-type">boolean</span>&nbsp;<span class="var-name">$reprocess</span> = <span class="var-default">false</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">boolean</span>
				<span class="var-name">$reprocess</span><span class="var-description">: if true, ignores memoized result of initial call</span>			</li>
				</ul>
		
			
	</div>
<a name="methodlabel" id="label"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">label</span> (line <span class="line-number">177</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns the HTML field label.</p>
	<ul class="tags">
				<li><span class="field">return:</span> the HTML label tag</li>
				<li><span class="field">author:</span> Jeff Ober</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			label
		</span>
				()
			</div>
	
		
			
			<hr class="separator" />
		<div class="notes">Redefined in descendants as:</div>
		<ul class="redefinitions">
					<li>
				<a href="../Fields/HiddenField.html#methodlabel">HiddenField::label()</a>
								: Does not print out a label.
							</li>
				</ul>
	</div>
<a name="methodprepare_value" id="prepare_value"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">prepare_value</span> (line <span class="line-number">264</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Pre-processes a value for validation, handling magic quotes if used.</p>
	<ul class="tags">
				<li><span class="field">return:</span> the pre-processed value</li>
				<li><span class="field">author:</span> Jeff Ober</li>
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			prepare_value
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$value</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$value</span><span class="var-description">: the value from the form array</span>			</li>
				</ul>
		
			
			<hr class="separator" />
		<div class="notes">Redefined in descendants as:</div>
		<ul class="redefinitions">
					<li>
				<a href="../Fields/FileField.html#methodprepare_value">FileField::prepare_value()</a>
								: Returns the file's $_FILES data array or false if the file was not  uploaded.
							</li>
					<li>
				<a href="../Fields/URLField.html#methodprepare_value">URLField::prepare_value()</a>
								: Prepares the value by inserting http:// to the beginning if missing.
							</li>
					<li>
				<a href="../Fields/BooleanField.html#methodprepare_value">BooleanField::prepare_value()</a>
								: Returns the value.
							</li>
				</ul>
	</div>
<a name="methodset_attribute" id="set_attribute"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">set_attribute</span> (line <span class="line-number">133</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Sets an HTML attribute of the field.</p>
	<ul class="tags">
				<li><span class="field">author:</span> Jeff Ober</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">null</span>
		<span class="method-name">
			set_attribute
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$key</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$value</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$key</span><span class="var-description">: the attribute name</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$value</span><span class="var-description">: the attribute's value</span>			</li>
				</ul>
		
			
	</div>
<a name="methodset_help_text" id="set_help_text"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">set_help_text</span> (line <span class="line-number">100</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Assigns help text to the field.</p>
	<ul class="tags">
				<li><span class="field">author:</span> Jeff Ober</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">null</span>
		<span class="method-name">
			set_help_text
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$text</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$text</span><span class="var-description">: the help text</span>			</li>
				</ul>
		
			
	</div>
<a name="methodset_value" id="set_value"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">set_value</span> (line <span class="line-number">111</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Sets the value of the field.</p>
	<ul class="tags">
				<li><span class="field">author:</span> Jeff Ober</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">null</span>
		<span class="method-name">
			set_value
		</span>
					(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$value</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">mixed</span>
				<span class="var-name">$value</span><span class="var-description">: the field's value</span>			</li>
				</ul>
		
			
			<hr class="separator" />
		<div class="notes">Redefined in descendants as:</div>
		<ul class="redefinitions">
					<li>
				<a href="../Fields/BooleanField.html#methodset_value">BooleanField::set_value()</a>
								: Sets the value of the field.
							</li>
				</ul>
	</div>
<a name="methodvalidate" id="validate"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">validate</span> (line <span class="line-number">283</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Raises a ValidationError if $value is invalid.</p>
	<ul class="tags">
				<li><span class="field">see:</span> <a href="../Fields/ValidationError.html">ValidationError</a></li>
				<li><span class="field">abstract:</span> </li>
				<li><span class="field">throws:</span> ValidationError</li>
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">null</span>
		<span class="method-name">
			validate
		</span>
					(<span class="var-type">string|mixed</span>&nbsp;<span class="var-name">$value</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string|mixed</span>
				<span class="var-name">$value</span><span class="var-description">: (may be mixed if prepare_value returns a non-string)</span>			</li>
				</ul>
		
			
			<hr class="separator" />
		<div class="notes">Redefined in descendants as:</div>
		<ul class="redefinitions">
					<li>
				<a href="../Fields/FileField.html#methodvalidate">FileField::validate()</a>
								: Throws a ValidationError if the file upload resulted in an error, if  the file was not a valid type, or if the file exceded the maximum size.
							</li>
					<li>
				<a href="../Fields/TextField.html#methodvalidate">TextField::validate()</a>
								: Validates that the value is less than $this-&gt;max_length;
							</li>
					<li>
				<a href="../Fields/URLField.html#methodvalidate">URLField::validate()</a>
								: Validates the the value is a valid URL (mostly).
							</li>
					<li>
				<a href="../Fields/EmailField.html#methodvalidate">EmailField::validate()</a>
								: Validates that the value is a valid email address.
							</li>
					<li>
				<a href="../Fields/DateTimeField.html#methodvalidate">DateTimeField::validate()</a>
								: Validates that the value is parsable as a date/time value.
							</li>
					<li>
				<a href="../Fields/RegexField.html#methodvalidate">RegexField::validate()</a>
								: Validates that the value matches the regular expression.
							</li>
					<li>
				<a href="../Fields/ScanField.html#methodvalidate">ScanField::validate()</a>
								: Validates that the value matches the sscanf format.
							</li>
					<li>
				<a href="../Fields/LargeTextField.html#methodvalidate">LargeTextField::validate()</a>
								: Returns null.
							</li>
					<li>
				<a href="../Fields/IntegerField.html#methodvalidate">IntegerField::validate()</a>
								: Validates that the value is parsable as an integer and that it is fewer  than $this-&gt;max_digits digits.
							</li>
					<li>
				<a href="../Fields/DecimalField.html#methodvalidate">DecimalField::validate()</a>
								: Validates that the value is parsable as a float.
							</li>
					<li>
				<a href="../Fields/BooleanField.html#methodvalidate">BooleanField::validate()</a>
								: Returns null.
							</li>
					<li>
				<a href="../Fields/DropDownField.html#methodvalidate">DropDownField::validate()</a>
								: Validates that $value is present in $this-&gt;choices.
							</li>
					<li>
				<a href="../Fields/MultipleChoiceField.html#methodvalidate">MultipleChoiceField::validate()</a>
								: Validates that each of the selected choice exists in $this-&gt;choices.
							</li>
				</ul>
	</div>
<a name="method__toString" id="__toString"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">__toString</span> (line <span class="line-number">213</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Serializes the field to HTML.</p>
	<ul class="tags">
				<li><span class="field">return:</span> the field's complete HTMl representation.</li>
				<li><span class="field">author:</span> Jeff Ober</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			__toString
		</span>
				()
			</div>
	
		
			
	</div>
						
		</div>
	</div>


	<p class="notes" id="credit">
		Documentation generated on Mon, 20 Apr 2009 08:29:23 -0400 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.2</a>
	</p>
	</div></body>
</html>